import request from "@/utils/request";

// 新增学期
export function addSchoolSemester(data) {
  return request({
    url: "/manager/schoolSemester",
    method: "post",
    data: data,
  });
}
// 修改学期
export function updateSchoolSemester(data) {
  return request({
    url: "/manager/schoolSemester",
    method: "put",
    data: data,
  });
}

// 删除学期
export function deleteSchoolSemester(id) {
  return request({
    url: "/manager/schoolSemester/" + id,
    method: "delete",
  });
}
//学期列表
export function getSchoolSemesterList(query) {
  return request({
    url: "/manager/schoolSemester/list",
    method: "get",
    params: query,
  });
}

//查询排课列表
export function getCourseSchedulingList(semesterId) {
  return request({
    url: "/manager/schoolSemester/" +semesterId,
    method: "get",
  });
}




//新增排课
export function addCourseScheduling(data) {
  return request({
    url: "/manager/courseScheduling",
    method: "post",
    data:data
  });
}

//修改排课
export function updateCourseScheduling(data) {
  return request({
    url: "/manager/courseScheduling",
    method: "put",
    data:data
  });
}

//修改排课
export function deleteCourseScheduling(id) {
  return request({
    url: "/manager/courseScheduling/" + id,
    method: "delete",
  });
}

//查询课程列表
export function getCourseList(semesterId,classId) {
  return request({
    url: "/manager/schoolSemester/courseList/" +semesterId+'/'+classId,
    method: "get",
  });
}
